﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<link rel="stylesheet" type="text/css" href="../JSSpec.css" />

<script type="text/javascript" src="../../javascripts/amplify/adapters/atlas/MicrosoftAjax.js"></script>
<script type="text/javascript" src="../../javascripts/amplify/adapters/atlas/system.js"></script>
<script type="text/javascript" src="../../javascripts/amplify/adapters/atlas/selector.js"></script>
<script type="text/javascript" src="../../javascripts/amplify/adapters/atlas/dom.js"></script>
<script type="text/javascript" src="../../javascripts/amplify/adapters/atlas/events.js"></script>
<script type="text/javascript" src="../../javascripts/amplify/adapters/atlas/ajax.js"></script>
<script type="text/javascript" src="../../javascripts/amplify/form/form.js"></script>
</head>
<body>
	<div style="display:none;"><p>A</p><p>B</p></div>
	<div id="test" style="background-color: Black">
		test
	</div>
	<form id="form1" action="validation.htm" method="post">
		<input type="text" id="username" name="username" value="" />
		<input type="text" id="password" name="password" value="" />
		<input type="submit" value="submit" />
	</form>
	
	
	<script type="text/javascript">
		amp.init(function() {

			var validation = amp.getValidation();
			var ruleSet = validation.createSet("form1", {
				"username": {
					"required": { "default": "", "message": "put a name in dummy" },
					"regex": { "with": "\\w{2,20}", message: "must be alpha numeric, between 2 - 20 characters." }
				}
			});

			validation.addSet(ruleSet);

			amp("#password").bind('blur', function() { amp.log("blur"); });

		});

		
		//panel.show();
	</script>
</body>
</html>
